//===============================
//  功能 ：备注 
//  作者 ：上中野辅亚瑟王 
//  创建时间 ：2023-07-23  06-41-47 
//  Unity版本  ：2019.4.35f1 
//  变更时间 :  2023-07-23  06-41-47 
//===============================





//using UnityEngine;
//using ZS.U3D.BASE.Networking;
//using UnityEngine.UI;
//using ZS.U3D.BASE.Runtime.Utils;

//public class UniNetworkDemo : MonoBehaviour
//{

//    private Text _text;
//    private InputField _inputField;


//    public PlayerController PlayerTemplect;


//    private void Start()
//    {
//        NetManager.Initialize();

//        NetManager.AddMsgListener(typeof(Player.CreatePlayer), CreatePlayerHandle);

//        Player.CreatePlayer create = new Player.CreatePlayer();
//        NetManager.SendPackage(create.ToPackage( ));

//        _text = Helper.Find<Text>(gameObject, "Text");
//        _inputField = Helper.Find<InputField>(gameObject, "InputField");

//        _inputField.onEndEdit.AddListener(p=> {
//            if (string.IsNullOrEmpty(_inputField.text))
//                return;

//            DialogMessage dialog = new DialogMessage
//            {
//                dialog = _inputField.text
//            };
//            NetManager.SendPackage(dialog.ToPackage());
//            _text.text += _inputField.text + "\n";
//            _inputField.text = string.Empty;

//        });
//    }

//    public void CreatePlayerHandle(DefaultNetPackage package) {
//        Player.CreatePlayer create = IMessage.FromPackage<Player.CreatePlayer>(package);

//        PlayerController player = Instantiate(PlayerTemplect);
//        player.gameObject.SetActive(true);
//        player.id = create.id;
//    }
//}
